package com.appwoo.txtws.component;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;

public class FileHelper
{
  public static void copyfile(File paramFile1, File paramFile2, Boolean paramBoolean)
  {
    if (!paramFile1.exists());
    while ((!paramFile1.isFile()) || (!paramFile1.canRead()))
      return;
    if (!paramFile2.getParentFile().exists())
      paramFile2.getParentFile().mkdirs();
    if ((paramFile2.exists()) && (paramBoolean.booleanValue()))
      paramFile2.delete();
    while (true)
    {
      FileOutputStream localFileOutputStream;
      byte[] arrayOfByte;
      int i;
      try
      {
        FileInputStream localFileInputStream = new FileInputStream(paramFile1);
        localFileOutputStream = new FileOutputStream(paramFile2);
        arrayOfByte = new byte[1024];
        i = localFileInputStream.read(arrayOfByte);
        if (i <= 0)
        {
          localFileInputStream.close();
          localFileOutputStream.close();
          return;
        }
      }
      catch (Exception localException)
      {
        Logger.e("readfile", localException.getMessage());
        return;
      }
      localFileOutputStream.write(arrayOfByte, 0, i);
    }
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.appwoo.txtws.component.FileHelper
 * JD-Core Version:    0.6.2
 */